<template>
    <div>
        detail {{id}}
    </div>
</template>
<script>
import { defineComponent } from '@vue/composition-api'

export default ({
    //生命周期
    data() {
        return {
            id : 123
        }
    },
    created() {
        // vue-router router 挂载宰了 vue原型链上
        this.id = this.route.params.id
        console.log(this.$route);
        console.log('++++++++++');
    }
})
</script>
